//
//  LoadedImages.m
//  TabulaImaginarium6
//
//  Created by TA2 on 6/7/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "LoadedImages.h"


@implementation LoadedImages

@synthesize images;
@synthesize tiledTokenImages;
@synthesize imageLayers;
@synthesize savedFiles;
@synthesize selectedTokenImage;
@synthesize selectedBackgroundImage;
@synthesize selectedMainBackgroundImage;
@synthesize selectedObjectImage;
@synthesize selectedColor;
@synthesize selectedSavedColor;
@synthesize selectedSnapColor;
@synthesize eraserActivated;
@synthesize drawingActivated;
@synthesize drawingWidth;

static LoadedImages *images = nil;

- (id)init {
	images = [[NSMutableDictionary alloc] init];
	tiledTokenImages = [[NSMutableDictionary alloc] init];
	imageLayers = [[NSMutableDictionary alloc] init];
    savedFiles = [[NSMutableArray alloc] init];
	selectedTokenImage = nil; 
	selectedBackgroundImage = nil;
	selectedMainBackgroundImage = nil;
    selectedObjectImage = nil;
    selectedColor = [UIColor blackColor];
    selectedSavedColor = [UIColor blackColor];
    drawingWidth = 2.0;
	return self;
}

+ (LoadedImages *)sharedLoadedImages {
    if (images == nil) {
        images = [[super allocWithZone:NULL] init];
    }
    return images;
}

+ (id)allocWithZone:(NSZone *)zone {
    return [[self sharedLoadedImages] retain];
}

- (id)copyWithZone:(NSZone *)zone {
    return self;
}

- (id)retain {
    return self;
}

- (NSUInteger)retainCount {
    return NSUIntegerMax;  //denotes an object that cannot be released
}

- (void)release {
    //do nothing
}

- (id)autorelease {
    return self;
}

@end
